# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicHypertension(models.Model):
    _name = 'basic_diabetes_follow'
    _description = '糖尿病随访表'

    healthCheck = fields.Char(string="体检编号", required=True)
    checkId = fields.Char(string="条码编号", required=True)
    resident_id = fields.Many2one("basic_info", ondelete='set null', string="居民ID", index=True)
    visitDate = fields.Date(string="随访日期", default=fields.Date.today())
    visitWay = fields.Selection([
        ('1', '门诊'),
        ('2', '家庭'),
        ('3', '电话')],
        string="随访方式")
    fas_bd_glu_mg = fields.Float(string='空腹血糖mg/dL')
    pos_bd_glu_mg = fields.Float(string='餐后血糖mg/dL')

    current_weight = fields.Float(string='目前体重')
    targt_weight = fields.Float(string='目标体重')
    current_bod_mas_indx = fields.Float(string='目前体质指数')
    targt_bod_mas_indx = fields.Float(string='目标体质指数')
    dor_pedis_artery_puls = fields.Selection([
        ('1', '触及正常'),
        ('2', '减弱'),
        ('3', '消失')],
        string="足背动脉搏动")
    phy_signs_o_des = fields.Char(string="体征-其他描述")
    current_daily_smok = fields.Integer(string="目前日吸烟量")
    targt_daily_smok = fields.Integer(string="目标日吸烟量")
    current_daily_clcl_con = fields.Float(string='目前日饮酒量')
    targt_daily_alcl_con = fields.Float(string='目标日饮酒量')
    exer_times = fields.Integer(string="运动次数/周")
    current_exe_min = fields.Integer(string="目前运动分钟数/次")
    targt_mov_times = fields.Integer(string="目标运动次数/周")
    targt_mov_min = fields.Integer(string="目标运动分钟数/次")
    current_staple_food = fields.Float(string='目前主食（克/天）')
    targt_staple_food = fields.Float(string='目标主食（克/天）')
    psych_adjst = fields.Selection([
        ('1', '良好'),
        ('2', '一般'),
        ('3', '差')],
        string="心理调整")
    compli_beh = fields.Selection([
        ('1', '良好'),
        ('2', '一般'),
        ('3', '差')],
        string="遵医行为")
    fas_bd_glu_mm = fields.Float(string='空腹血糖值mmol/L')
    gly_hemo = fields.Float(string='糖化血红蛋白(%)')
    check_date = fields.Date(string="检查日期", default=fields.Date.today())
    medic_compli = fields.Selection([
        ('1', '规律'),
        ('2', '间断'),
        ('3', '不服药')],
        string="服药依从性")
    adv_drug_reac = fields.Selection([
        ('1', '无'),
        ('2', '有')],
        string="药物不良反应")
    adv_drug_reac_descr = fields.Char(string="药物不良反应描述")
    hyp_reac = fields.Selection([
        ('1', '无'),
        ('2', '偶尔'),
        ('3', '频繁')],
        string="低血糖反应")
    visitEvaluate = fields.Selection([
        ('1', '控制满意'),
        ('2', '控制不满意'),
        ('3', '不良反应'),
        ('4', '并发症')],
        string="此次随访分类")
    next_step_man_meas = fields.Selection([
        ('1', '常规随访'),
        ('2', '第1次控制不满意2周随访'),
        ('3', '两次控制不满意转诊随访'),
        ('4', '紧急转诊')],
        string="下一步管理措施")
    current_types_insu = fields.Char(string="目前胰岛素种类")
    current_usage_dosage_insu = fields.Char(string="目前胰岛素用法和用量")
    rec_types_of_insu = fields.Char(string="建议胰岛素种类")
    usage_rec_dosage_insu = fields.Char(string="建议胰岛素用法和用量")
    reason_ref = fields.Char(string="转诊原因")
    ref_inst_depar = fields.Char(string="转诊机构及科别")
    telephone = fields.Char(string="联系人及电话")
    ref_results = fields.Selection([
        ('1', '到位'),
        ('2', '不到位')],
        string="转诊结果")
    next_flup_date = fields.Date(string="下次随访日期", default=fields.Date.today())
    visitDoctor = fields.Selection([
        ('1', '小明'),
        ('2', '小文'),
        ('3', '小样')],
        string="随访医生签名")
    resident_signa = fields.Char(string="居民签名")
    remark_col = fields.Char(string="备注")
    create_per = fields.Char(string="建档人")
    create_org = fields.Char(string="建档机构")
    create_time = fields.Date(string="创建时间", default=fields.Date.today())
    update_time = fields.Date(string="更新时间", default=fields.Date.today())
    is_delete = fields.Selection([
        ('0', '否'),
        ('1', '是')],
        string="是否删除")
    mod_state = fields.Selection([
        ('0', '未修改不需上传'),
        ('1', '修改需要上传')],
        string="修改状态")
    height = fields.Float(string='身高')
    current_insu_con = fields.Char(string="目前胰岛素用量")
    is_gen_auto = fields.Selection([
        ('0', '不是自动生成'),
        ('1', '自动生成')],
        string="是否是自动生成")
    followup_type = fields.Selection([
        ('1', '正常随访'),
        ('2', '二次随访')],
        string="随访类型")
